package cz.gelion.shylock.invoice.data

import scala.slick.driver.PostgresDriver.simple._
import java.util.Calendar
import java.util.Date
import java.sql.Timestamp
import scala.beans.BeanProperty


case class Subject(
  @BeanProperty 	id:Int, 
  @BeanProperty  	prefix:String,
  @BeanProperty 	name:String,
  @BeanProperty  	mtime:Timestamp) {
  
  
}

object Subjects extends Table [(Subject)](Some("invoice"), "subject"){

  def id = column[Int]("id", O.PrimaryKey)
  def prefix = column[Option[String]]("prefix")
  def name = column[Option[String]]("name")
  def mtime = column[Timestamp]("mtime")
  
  
  def * = id ~ prefix.get ~ name.get ~ mtime <> (Subject, Subject.unapply _)
  
  
}


